Thanks to our database admin
I finally fixed it.
1) first i got the error from ulsviewer
The error is as below.
Unexpected query execution failure, error code 3621. Additional error information from SQL Server is included below. "The statement has been terminated." Query text (if available):
"SET NOCOUNT ON;
DECLARE @DN nvarchar(256),
@LN nvarchar(128),
@@DocUIVersion int,
@@Level tinyint,
@@S uniqueidentifier;
DECLARE
@ItemId int;
DECLARE
@@iRet int;
DECLARE
@ExtraItemSize int;
DECLARE @Login nvarchar(255);
DECLARE @Title nvarchar(255);
DECLARE @Email nvarchar(255);
DECLARE @Notes nvarchar(1023);
DECLARE @AddedToTable bit;
DECLARE @UserIdOut int;
DECLARE @LoginOut nvarchar(255);
DECLARE @TitleOut nvarchar(255);
DECLARE @EmailOut nvarchar(255);
DECLARE @NotesOut nvarchar(1023);
DECLARE @DeletedOut bit;
DECLARE @IsGroup bit;
SET @IsGroup = 0;
SET @@Level = 1;
SELECT @Login = ?;
SELECT @Title = ?;
SELECT @Email = ?;
SELECT @Notes = ?;
SELECT @@S=?;
BEGIN TRAN;
EXEC @@iRet = proc_SecAddUser @@S, ?, ?, ?, ?, ?,
@Login,
@Title,
@Email,
@Notes, ?, ?, ?, ?,
@AddedToTable OUTPUT,
@UserIdOut OUTPUT,
@LoginOut OUTPUT,
@TitleOut OUTPUT,
@EmailOut OUTPUT,
@NotesOut OUTPUT,
@DeletedOut;
IF @@iRet <> 0
BEGIN ROLLBACK TRAN;
GOTO DONE;
END ;
SELECT @ItemId = @UserIdOut
IF NOT EXISTS
( SELECT tp_ID FROM UserData WHERE tp_ListId = '0CD9DAD1-9089-48DA-BA83-3A36F332F687'
AND tp_ID = @ItemId AND tp_Level = 1 AND tp_RowOrdinal =0)
BEGIN SELECT @ExtraItemSize = 0
EXEC @@iRet = proc_AddListItem @SiteId = '3C466FB8-5AC0-417B-9F22-2158CD45F1C2',
@WebId='17FA90F6-3279-4078-A99A-3227121D776F',
@ListID = '0CD9DAD1-9089-48DA-BA83-3A36F332F687',
@RowOrdinal = 0,
@ItemId = @ItemId OUTPUT,
@ItemDirName=@DN OUTPUT,
@ItemLeafName=@LN OUTPUT,
@UserID = 1,
@TimeNow = '20120430 21:43:52',
@ServerTemplate = 112,
@Basetype= 0,
@Level= 1,
@tp_GUID =NULL,
@AddNamespace=1,
@CheckDiskQuota=1,
@tp_ContentTypeId = ?,
@nvarchar1 = ?,
@nvarchar3 = ?,
@nvarchar4 = ?,
@nvarchar5 = ?,
@bit2 = ?,
@bit3 = ?,
@nvarchar8 = ?,
@nvarchar9 = ?,
@bit4 = ?,
@tp_ContentType = ?,
@tp_ModerationStatus = ?,
@Size = 76,
@ExtraItemSize = @ExtraItemSize ,
@acl=0xF3FE0000010000000000000000000000;
IF @@iRet <> 0
BEGIN ROLLBACK TRAN;
GOTO DONE;
END END ;
COMMIT TRAN;
DONE:
SELECT @@iRet,
@ItemId,
@AddedToTable,
@LoginOut,
@TitleOut,
@EmailOut,
@NotesOut,
@DeletedOut "
2) The second step I had to start the sql profiler when i was adding the user . I had to filter the sql profiler wiith tha database name as it saved me loads of time.
It gave the following error. primary key viloation error for the alluserdata table.
3) In the end i found there was a primary constraint on the userdata table which stopped duplicate data.
I had to delete a record and then it started working.
Hope this helps someone.
-
Edited by
john 1990
Tuesday, May 01, 2012 3:57 PM
-
Marked as answer by
john 1990
Tuesday, May 01, 2012 3:57 PM